﻿using Codemonk.Pease.Common;
using Codemonk.Pease.Server.AspectMonitors;
using Codemonk.Pease.Server.HttpServer;
using Codemonk.Pease.Server.InterfaceActivators;
using Codemonk.Pease.Server.ObjectDecorators;
using Codemonk.Pease.Server.Serialization;
using System.Web;

namespace Codemonk.Pease.Server.Example
{
    public class AppoinedJsonAsyncResult : ResponsedAsyncResult
    {
        private static IMethodInvoker<HttpContext, string> invoker = new MethodInvoker<HttpContext, string>();
        protected override IMethodInvoker<HttpContext, string> Invoker
        {
            get { return invoker; }
        }

        private static ISerializater<string> jsonSerializater = new JsonSerializater();
        protected override ISerializater<string> Serializater
        {
            get { return jsonSerializater; }
        }

        private static IInterfaceActivator activator = new AppointActivator();
        protected override IInterfaceActivator Activator
        {
            get { return activator; }
        }

        protected override IObjectDecorator<HttpContext> Decorator { get { return null; } }

        private static IAspectMonitor<HttpContext> monitor = new CachedLogAspectMonitor();
        protected override IAspectMonitor<HttpContext> Monitor
        {
            get { return monitor; }
        }
    }
}
